package com.songlanyun.modules.kqbank.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.songlanyun.modules.kqbank.dao.KqBankSignDao;
import com.songlanyun.modules.kqbank.entity.KqBankSign;
import com.songlanyun.modules.kqbank.service.KqBankSignService;
import com.songlanyun.modules.memberbill.dao.SaleRefillVoucherBillDao;
import com.songlanyun.modules.memberbill.entity.SaleRefillVoucherBillEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

@Service
public class KqBankSignServiceImpl extends ServiceImpl<KqBankSignDao, KqBankSign> implements KqBankSignService {

    @Autowired
    private KqBankSignDao kqBankSignDao;
    @Override
    public List<KqBankSign> getKqBankSign(String cardType, String bankCode) {
        List<KqBankSign> list = new ArrayList<>();
        KqBankSign kqBankSign = kqBankSignDao.selectOne(new LambdaQueryWrapper<KqBankSign>()
                .eq(KqBankSign::getCardType, cardType)
                .eq(KqBankSign::getBankCode, bankCode));
        KqBankSign bankSign = kqBankSignDao.selectOne(new LambdaQueryWrapper<KqBankSign>().eq(KqBankSign::getBankName, "快钱"));
        if (kqBankSign != null){
            list.add(kqBankSign);
        }
        list.add(bankSign);
        return list;
    }
}
